/**
 * @author nttdocomo
 */
define(function(require) {
	require("../panel/panel");
	aries.klass("aries.form.Panel", aries.panel.Panel.extend({
		initComponent : function() {
			var me = this;

			if (me.frame) {
				me.border = false;
			}

			me.initFieldAncestor();
			aries.panel.Panel.prototype.initialize.apply(this, arguments);

			// Start polling if configured
			/*if (me.pollForChanges) {
				me.startPolling(me.pollInterval || 500);
			}*/
		},
		initItems : function() {
			this.form = this.createForm();
			/*call the super method*/
		},
		createForm : function() {
			return new aries.form.Basic(this, Ext.applyIf({
				listeners : {}
			}, this.initialConfig));
		},

		/**
		 * Start an interval task to continuously poll all the fields in the form for changes in their
		 * values. This is normally started automatically by setting the {@link #pollForChanges} config.
		 * @param {Number} interval The interval in milliseconds at which the check should run.
		 */
		startPolling : function(interval) {
			this.stopPolling();
			/*var task = new Ext.util.TaskRunner(interval);
			task.start({
				interval : 0,
				run : this.checkChange,
				scope : this
			});
			this.pollTask = task;*/
		}
	}))
})
